<?php
declare (strict_types = 1);
namespace app\common\controller;
/**
 * 前台接口控制器基类
 * Class ApiController
 * @package app\common\controller
 */

use app\BaseController;
use think\Model;
use \liliuwei\think\Jump;
use think\exception\HttpResponseException;

class ApiController extends BaseController
{

    /**
     * 当前模型
     * @Model
     * @var object
     */
    protected $model;

    /**
     * 字段排序
     * @var array
     */
    protected $sort = [
        'sort' => 'desc',
    ];


    /**
     * 初始化方法
     */
    protected function initialize()
    {


        parent::initialize();
        header('Access-Control-Allow-Origin: http://www.dcpxjypt.cn');
        header('Access-Control-Allow-Methods:POST,GET');
        header('Access-Control-Allow-Credentials: true');
        header('Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept');



    }



}